import 'package:app_plugin/app_plugin.dart';
import 'package:flutter/material.dart';

class SettingsPage extends StatefulWidget {
  final AppOptions options;
  final ValueChanged<AppOptions> onOptionsChanged;

  SettingsPage(this.options, this.onOptionsChanged);

  @override
  State<StatefulWidget> createState() {
    return _SettingsPage();
  }
}

class _SettingsPage extends State<SettingsPage>
    with AutomaticKeepAliveClientMixin {
  @override
  Widget build(BuildContext context) {
    super.build(context);
    return Scaffold(
      appBar: AppBar(
        title: Text('Settings'),
        centerTitle: true,
      ),
      body: AppOptionsPage(
        options: widget.options,
        onOptionsChanged: widget.onOptionsChanged,
      ),
    );
  }

  @override
  bool get wantKeepAlive => true;
}
